import React from "react";
import routeWithUserSession from "@/components/ApplicationArea/routeWithUserSession";
import PaymentToolbar from "@/components/payment/PaymentToolbar";
import routes from "@/services/routes";

class PaymentNew extends React.Component {


  componentWillMount() {

  }

  render() {
    return (
      <div className="settings-screen">
        <div className="container">
          <div  style={{width:"400px",height:"40px"}}>
            <div style={{width:"20px",height:"38px", float: "left"}}>
            </div>
              <div style={{width:"50px",height:"38px", float: "left"}}>
              <img src="/static/images/payment.png" alt="HR" loading="lazy"/>
            </div>
              <div style={{width:"320px",height:"30px",float:"left"}}>
              <h3 style={{margin:"7px",padding:"0"}}>{ this.props.paytype ===0 ? "付款信息":"收款信息"}</h3>
            </div>
          </div>
            <div className="p-15">
              <PaymentToolbar  id={this.props.id}  paytype ={this.props.paytype} projectdetailid={this.props.projectdetailid}/>
            </div>
        </div>
      </div>
    );
  }
}

routes.register(
  "Payment.New",
  routeWithUserSession({
    path: "/payment/outnew/:id/:projectdetailid",
    title: "付款信息",
    render: pageProps => <PaymentNew {...pageProps}  paytype={0}/>,
  })
);

routes.register(
  "Payment.New2",
  routeWithUserSession({
    path: "/payment/innew/:id/:projectdetailid",
    title: "收款信息",
    render: pageProps => <PaymentNew {...pageProps}  paytype={1}/>,
  })
);